<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>xilsecure: XilSecure MGF Server APIs</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">xilsecure
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;"
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__xsecure__mgf__server__apis.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">XilSecure MGF Server APIs</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_secure___hash_alg_info.html">XSecure_HashAlgInfo</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure for Hash Algorithm Info.  <a href="struct_x_secure___hash_alg_info.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_x_secure___mgf_input.html">XSecure_MgfInput</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure has input and output parameters used for MGF.  <a href="struct_x_secure___mgf_input.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaa02bc7c1534754656c639d206cce86df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__mgf__server__apis.html#gaa02bc7c1534754656c639d206cce86df">XSECURE_I2OSP_LIMIT</a>&#160;&#160;&#160;(256U)</td></tr>
<tr class="memdesc:gaa02bc7c1534754656c639d206cce86df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Integer to octet stream primitive limit.  <a href="#gaa02bc7c1534754656c639d206cce86df">More...</a><br/></td></tr>
<tr class="separator:gaa02bc7c1534754656c639d206cce86df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga40f95b0f59b06abf8ee6dda379447069"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__mgf__server__apis.html#ga40f95b0f59b06abf8ee6dda379447069">XSECURE_SHA3_HASH_LENGTH_IN_BYTES</a>&#160;&#160;&#160;(48U)</td></tr>
<tr class="memdesc:ga40f95b0f59b06abf8ee6dda379447069"><td class="mdescLeft">&#160;</td><td class="mdescRight">SHA3 Hash length in bytes.  <a href="#ga40f95b0f59b06abf8ee6dda379447069">More...</a><br/></td></tr>
<tr class="separator:ga40f95b0f59b06abf8ee6dda379447069"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3528d2ff2183bb3aab43e4d408ee6760"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_x_secure___hash_alg_info.html">XSecure_HashAlgInfo</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__mgf__server__apis.html#ga3528d2ff2183bb3aab43e4d408ee6760">XSecure_GetHashInstance</a> (XSecure_ShaMode Shatype)</td></tr>
<tr class="memdesc:ga3528d2ff2183bb3aab43e4d408ee6760"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function returns hash function list of user specified hash algorithm.  <a href="#ga3528d2ff2183bb3aab43e4d408ee6760">More...</a><br/></td></tr>
<tr class="separator:ga3528d2ff2183bb3aab43e4d408ee6760"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga51accda21580807193b7f1309a153c52"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__xsecure__mgf__server__apis.html#ga51accda21580807193b7f1309a153c52">XSecure_MaskGenFunc</a> (XSecure_ShaMode ShaType, void *InstancePtr, <a class="el" href="struct_x_secure___mgf_input.html">XSecure_MgfInput</a> *MgfInput)</td></tr>
<tr class="memdesc:ga51accda21580807193b7f1309a153c52"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function takes an input of variable length and a desired output length as input, and provides fixed output mask using cryptographic hash function.  <a href="#ga51accda21580807193b7f1309a153c52">More...</a><br/></td></tr>
<tr class="separator:ga51accda21580807193b7f1309a153c52"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="gaa02bc7c1534754656c639d206cce86df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_I2OSP_LIMIT&#160;&#160;&#160;(256U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Integer to octet stream primitive limit. </p>

</div>
</div>
<a class="anchor" id="ga40f95b0f59b06abf8ee6dda379447069"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define XSECURE_SHA3_HASH_LENGTH_IN_BYTES&#160;&#160;&#160;(48U)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>SHA3 Hash length in bytes. </p>

<p>Referenced by <a class="el" href="group__xsecure__mgf__server__apis.html#ga51accda21580807193b7f1309a153c52">XSecure_MaskGenFunc()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga3528d2ff2183bb3aab43e4d408ee6760"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_x_secure___hash_alg_info.html">XSecure_HashAlgInfo</a> * XSecure_GetHashInstance </td>
          <td>(</td>
          <td class="paramtype">XSecure_ShaMode&#160;</td>
          <td class="paramname"><em>Shatype</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function returns hash function list of user specified hash algorithm. </p>
<p>Get Hash Instance function.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">Shatype</td><td>holds the XSecure_ShaMode value of chosen sha algo.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>Pointer to <a class="el" href="struct_x_secure___hash_alg_info.html" title="Structure for Hash Algorithm Info. ">XSecure_HashAlgInfo</a> instance</li>
<li>NULL Otherwise </li>
</ul>
</dd></dl>

<p>Referenced by <a class="el" href="group__xsecure__mgf__server__apis.html#ga51accda21580807193b7f1309a153c52">XSecure_MaskGenFunc()</a>.</p>

</div>
</div>
<a class="anchor" id="ga51accda21580807193b7f1309a153c52"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int XSecure_MaskGenFunc </td>
          <td>(</td>
          <td class="paramtype">XSecure_ShaMode&#160;</td>
          <td class="paramname"><em>ShaType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>InstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_secure___mgf_input.html">XSecure_MgfInput</a> *&#160;</td>
          <td class="paramname"><em>MgfInput</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function takes an input of variable length and a desired output length as input, and provides fixed output mask using cryptographic hash function. </p>
<p>Mask Generation function.</p>
<p>i.e. Mask Generation Function(MGF).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ShaType</td><td>is of type XSecure_ShaMode. </td></tr>
    <tr><td class="paramname">InstancePtr</td><td>is pointer to the sha instance. </td></tr>
    <tr><td class="paramname">MgfInput</td><td>is pointer to <a class="el" href="struct_x_secure___mgf_input.html" title="Structure has input and output parameters used for MGF. ">XSecure_MgfInput</a> instance.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS On success.</li>
<li>XST_INVALID_PARAM If any input parameter is invalid</li>
<li>XST_FAILURE On failure. </li>
</ul>
</dd></dl>

<p>References <a class="el" href="struct_x_secure___hash_alg_info.html#a2d651b4f8029fd1bde167f52f7b0a680">XSecure_HashAlgInfo::HashLen</a>, <a class="el" href="struct_x_secure___mgf_input.html#a3df7726c093f8481f8649de0fbbad69b">XSecure_MgfInput::Output</a>, <a class="el" href="struct_x_secure___mgf_input.html#a7ef2ac3615a3516392e8f3e7af2301c2">XSecure_MgfInput::OutputLen</a>, <a class="el" href="struct_x_secure___mgf_input.html#a75315a260d2fc303f4e09f6115da6ba8">XSecure_MgfInput::Seed</a>, <a class="el" href="struct_x_secure___mgf_input.html#a4b5d243ace02a92433f2a3b7593480a3">XSecure_MgfInput::SeedLen</a>, <a class="el" href="struct_x_secure___hash_alg_info.html#a1252ac9d152a5cbb5731d66d19e6f634">XSecure_HashAlgInfo::ShaFinish</a>, <a class="el" href="struct_x_secure___hash_alg_info.html#a6c89a5bf973d16144020ebece7415504">XSecure_HashAlgInfo::ShaStart</a>, <a class="el" href="struct_x_secure___hash_alg_info.html#ae3302b269d249878b73bb94363200795">XSecure_HashAlgInfo::Shatype</a>, <a class="el" href="struct_x_secure___hash_alg_info.html#aaec31389331a3137f07364a5852286c0">XSecure_HashAlgInfo::ShaUpdate</a>, <a class="el" href="group__xsecure__mgf__server__apis.html#ga3528d2ff2183bb3aab43e4d408ee6760">XSecure_GetHashInstance()</a>, <a class="el" href="group__xsecure__mgf__server__apis.html#ga40f95b0f59b06abf8ee6dda379447069">XSECURE_SHA3_HASH_LENGTH_IN_BYTES</a>, and <a class="el" href="group__xsecure__generic__server__apis.html#ga014b8298824e67a2e9fe8a5c8719f59a">XSECURE_WORD_SIZE</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
